package cn.rongdao.jrkabao.model.information;

import com.mifengkong.frtools.http.request.HttpFunction;

import cn.rongdao.jrkabao.bean.information.QuotaBean;
import cn.rongdao.jrkabao.model.api.BaseSuDaiModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jiangyongxing on 2017/9/21.
 * 描述：
 */

public class QuotaDataModel extends BaseSuDaiModel {

    public static QuotaDataModel getInstance() {
        return getPresent(QuotaDataModel.class);
    }

    public void execute(Observer<QuotaBean> observer) {
        execute("1",observer);
    }

    public void execute(String isIndex,Observer<QuotaBean> observer) {
        addParamStrings("isIndex",isIndex);
        Observable<QuotaBean> observable = mServletApi.getUserQuoteData(mParams).map(new HttpFunction<QuotaBean>());
        toSubscribe(observable, observer);
    }
}
